﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;

namespace ExpenseSystem.Model
{
    [TableName("ORG_TITLE")]
    public class TitleModel:NormalModel
    {
        private string _code;
        private string _name;
        private bool _sales;
        private bool _service;
        private bool _designer;
        private bool _carrier;

        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }
        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;
                _name = value;
                if (!PropertyUpdated.Contains("Name"))
                    PropertyUpdated.Add("Name");
            }
        }

        public virtual bool Sales
        {
            get { return _sales; }
            set
            {
                if (_sales == value)
                    return;
                _sales = value;
                if (!PropertyUpdated.Contains("Sales"))
                    PropertyUpdated.Add("Sales");
            }
        }

        public virtual bool Carrier
        {
            get { return _carrier; }
            set
            {
                if (_carrier == value)
                    return;
                _carrier = value;
                if (!PropertyUpdated.Contains("Carrier"))
                    PropertyUpdated.Add("Carrier");
            }
        }

        public virtual bool Service
        {
            get { return _service; }
            set
            {
                if (_service == value)
                    return;
                _service = value;
                if (!PropertyUpdated.Contains("Service"))
                    PropertyUpdated.Add("Service");
            }
        }

        public virtual bool Designer
        {
            get { return _designer; }
            set
            {
                if (_designer == value)
                    return;
                _designer = value;
                if (!PropertyUpdated.Contains("Designer"))
                    PropertyUpdated.Add("Designer");
            }
        }
    }
}
